Micron Document
🌎 rns.kin.earth git 🌍

Node / dev / reticulum / commits / c30feb3

Commit c30feb3fc20fd83608c5cfc37ec6e569ddd3ba47


Parents : 4c81589
Author : gretel <code@jitter.eu>
Date : 2024-11-30T19:18:43+01:00

ci/cd: add release automation

Publishes a release when tagged with a `semver` version:
- X.Y.Z for "production quality" (1.0.0)
- X.Y.Z-suffix for development (1.0.0-alpha.1)

Release will be marked as 'prerelease' accordingly.

For now, any release will be marked 'draft'.

Changes

3 files changed, 97 insertions(+), 29 deletions(-)

M README.md +1 -1

Diff

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 00000000..42fc0772
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,96 @@
+name: Build Reticulum
+
+on:
+ push:
+ branches:
+ - '*'
+ tags:
+ - "[0-9]+.[0-9]+.[0-9]+*"
+ pull_request:
+ branches:
+ - master
+ paths-ignore:
+ - .gitignore
+ - LICENSE
+
+permissions:
+ contents: write
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: false
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.x
+ - run: make test
+
+ package:
+ needs: test
+ if: startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+ environment: ${{ contains(github.ref, '-') && 'development' || 'production' }}
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: 3.x
+ - run: |
+ python -m pip install -q build wheel setuptools
+ make remove_symlinks
+ make build_wheel
+ make build_pure_wheel
+ make create_symlinks
+ - uses: actions/upload-artifact@v4
+ with:
+ name: package
+ path: dist/*.whl
+
+ documentation:
+ needs: test
+ if: startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+ environment: ${{ contains(github.ref, '-') && 'development' || 'production' }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-python@v5
+ with:
+ python-version: 3.x
+ - run: |
+ sudo apt-get -qq update && sudo apt-get -qq install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
+ python -m pip -q install sphinx sphinx-copybutton
+ cd docs && make latexpdf && make epub
+ - uses: actions/upload-artifact@v4
+ with:
+ name: documentation
+ path: |
+ docs/build/latex/*.pdf
+ docs/build/epub/*.epub
+
+ release:
+ needs: [package, documentation]
+ if: startsWith(github.ref, 'refs/tags/')
+ runs-on: ubuntu-latest
+ environment: ${{ contains(github.ref, '-') && 'development' || 'production' }}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/download-artifact@v4
+ with:
+ path: .artifacts
+ - uses: softprops/action-gh-release@v2
+ with:
+ files: |
+ .artifacts/package/**.whl
+ .artifacts/documentation/latex/reticulumnetworkstack.pdf
+ .artifacts/documentation/epub/ReticulumNetworkStack.epub
+ draft: true
+ generate_release_notes: true
+ prerelease: ${{ contains(github.ref, '-') }}
+ fail_on_unmatched_files: true

diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml
deleted file mode 100644
index 86913774..00000000
--- a/.github/workflows/python-app.yml
+++ /dev/null
@@ -1,28 +0,0 @@
-# This workflow will install Python dependencies, run tests and lint with a single version of Python
-# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
-
-name: Test suite
-
-on:
- push:
- branches: [ "master" ]
- pull_request:
- branches: [ "master" ]
-
-permissions:
- contents: read
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - name: Set up Python 3.10
- uses: actions/setup-python@v3
- with:
- python-version: "3.10"
- - name: Test
- run: |
- make test

diff --git a/README.md b/README.md
index e2aee6d6..5aebe3d7 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Reticulum Network Stack β <img align="right" src="https://static.pepy.tech/personalized-badge/rns?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Installs" style="padding-left:10px"/><a href="https://github.com/markqvist/reticulum/actions/workflows/python-app.yml"><img align="right" src="https://github.com/markqvist/reticulum/actions/workflows/python-app.yml/badge.svg"/></a>
+Reticulum Network Stack β <img align="right" src="https://static.pepy.tech/personalized-badge/rns?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Installs" style="padding-left:10px"/><a href="https://github.com/markqvist/Reticulum/actions/workflows/build.yml"><img align="right" src="https://github.com/markqvist/Reticulum/actions/workflows/build.yml/badge.svg"/></a>
==========
<p align="center"><img width="200" src="https://raw.githubusercontent.com/markqvist/Reticulum/master/docs/source/graphics/rns_logo_512.png"></p>

Served by rngit 1.5.2 - Generated in 0.05s